<template>
	<view class="content">
		<view class="cu-bar search bg-white">
			<view class="search-form round">
				<text class="cuIcon-search"></text>
				<input  @blur="InputBlur" :adjust-position="false" type="text" placeholder="搜索影片" confirm-type="search"></input>
			</view>
			<view class="action" @tap="handle">
				<button class="cu-btn bg-red shadow-blur round">搜索</button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:'search',
		props:['keyword'],
		data() {
			return {
				InputBottom:0,
				key:''
			}
		},
		onLoad() {

		},
		methods: {
			InputBlur(e) {
				this.key = e.target.value;
				this.InputBottom = 0;
			},
			handle(){
				console.log(this.key);
				this.$emit('search',this.key)
			}
		}
	}
</script>

<style lang="scss" scoped>
.content{
	position: fixed;
	top: 0upx;
	width: 100%;
	height: 100upx;
	z-index: 2;
}
.cu-bar{
			width: 100%;
			background-color: $bg-color;
		}
</style>
